﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Data.SqlClient;

namespace YTSK
{
    public static class ExpressionExt
    {
        #region 转换LambdaExpression为SQL语句，提供给外部调用
        /// <summary>
        /// 转换LambdaExpression为SQL语句
        /// </summary>
        /// <param name="exxx"></param>
        /// <param name="paras"></param>
        /// <returns></returns>
        public static string GetSql(this Expression exxx, out List<SqlParameter> paras)
        {
            var resolve = new Ext.ExpressionResolve();
            return resolve.DealExpress(exxx,out paras);
        }
        #endregion


    }
}
